package com.frame.work.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.frame.work.entity.TblMessage;
import com.frame.work.entity.TblSecurityLog;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @author hewenze
 */
@Component
public interface TblMessageService extends IService<TblMessage> {


    /**
     * 推送消息处理
     */

    void insert(TblMessage tblMessage);

    List<TblMessage> selectByTime(Integer pageNum, Integer pageSize, String messageType, String userId);

    int deleteAllByUserId(String userId, String messageType);

    int deleteByIds(List<String> ids);

    /**
     * 查询某用户未读消息数量
     *
     * @param messageType 8系统消息
     * @param userId
     * @return
     */
    int getUnReadSystemMessageCount(String messageType, String userId);
}
